using TMPro;
using UnityEngine;

namespace Game.UI {
	public sealed class HintView : MonoBehaviour {
		public TMP_Text TextField;
		RectTransform _transform;

		private void Awake() {

			if ( !_transform) {
				_transform = GetComponent<RectTransform>();
			}
		}

		public void SetupHint(string text, Vector2 pos) {
			if ( !_transform ) {
				_transform = GetComponent<RectTransform>();
			}
			_transform.anchoredPosition = pos;
			_transform.gameObject.SetActive(true);
			TextField.text = text;
		}

		public void HideHint() {
			_transform.gameObject.SetActive(false);
		}
	}
}

